#pragma once
#include "common_tool/factory.h"
#include "node_base.h"
#include "node_lateral_speed3dis.h"
#include "node_lateral_speed.h"
#include "node_lateral_speed_yaw.h"
#include "node_ll.h"
#include "node_ll_4d4s.h"
#include "node_vy_yaw_error3dis.h"
namespace auto_ros
{
namespace control
{
template <class derived>
NodeBase *createNodeDerived(double loop_rate, std::string node_yaml_file_name)
{
	return new derived(loop_rate, node_yaml_file_name);
}
using vehicle_node_factory_type =
	auto_ros::common_tool::Factory<std::string, NodeBase, NodeBase *(*)(double loop_rate, std::string node_yaml_file_name)>;
class NodeFactory : public vehicle_node_factory_type
{
private:
	/* data */
public:
	NodeFactory()
	{
		//Register("KfLateral", createKfDerived<KfLateral>);
		Register("NodeLateralSpeed3dis", createNodeDerived<NodeLateralSpeed3dis>);
		Register("NodeLateralSpeed", createNodeDerived<NodeLateralSpeed>);
		Register("NodeLateralSpeedYaw", createNodeDerived<NodeLateralSpeedYaw>);
		Register("NodeVyYawError3dis", createNodeDerived<NodeVyYawError3dis>);
		Register("NodeLL", createNodeDerived<NodeLL>);
		Register("NodeLL4d4s", createNodeDerived<NodeLL4d4s>);
	}
};
} // namespace control
} // namespace auto_ros
